home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: mxsld2.pd.infn.it!LORETI
- From: loreti@mxsld2.pd.infn.it (Maurizio Loreti)
- Subject: Re: Printing to LPT1 Printer from within program
- X-Nntp-Posting-Host: mxsld2.pd.infn.it
- Message-ID: <DM23uK.7u0@news.cern.ch>
- Sender: news@news.cern.ch (USENET News System)
- Reply-To: loreti@mxsld2.pd.infn.it
- Organization: I.N.F.N. Padova - CDF/CMS VAXcluster
- References: <4e5ee9$m28_001@pr.mcs.net>,<31076D63.289D@cmt.lpr.mail.carel.fi>
- Date: Wed, 31 Jan 1996 17:42:18 GMT
-
- In article <31076D63.289D@cmt.lpr.mail.carel.fi>, Ari Lukumies <aril@cmt.lpr.mail.carel.fi> writes:
- >Michael D. Perry wrote:
- >>
- >> I have just started taking a C programming class and am using Borland
- >> C++ v4.0 at home. Both my teacher and I are stumped as to how to
- >> print to a LPT (Line Printer) device from within the program.
- >>
- >> I have read the FAQ and there are some references to this but not
- >> enough that I can quite figure it out. As near as I can figure you
- >> can use iostreams or fprintf() with the later appearing to be the
- >> simpler of the two. With that, from what I have seen, one uses a
- >> filename of stdprn but I get an error message when compiling. My
- >> guess is that there is a header file or a definition/declaration
- >> statement that needs to be referenced.
- >> [rest snipped]
- >
- >Have you tried:
- >
- > #include <stdio.h>
- >
- > int main(int argc, char **argv)
- > {
- > while (argc--)
- > fprintf(stderr, "%s\n", *argv++);
- > }
- >
- >Later,
- >AriL
- >--
- >All my opinions are mine and mine alone.
-
- I hardly can see how _that_ prints on the line printer...
- --
- Maurizio Loreti http://mvxpd5.pd.infn.it/wwwcdf/mlo.html
- Un. of Padova, Dept. of Physics - Padova, Italy loreti@padova.infn.it
-